#pragma once

//@author A0096950U
#include <fstream>
#include <string>

using namespace std;

enum LogLevel {
	LOG_ERROR,
	LOG_WARNING,
	LOG_INFO,
	LOG_DEBUGGING
};

class Logger {
private:
	static bool instanceFlag;
	static Logger* instance;

	LogLevel logTreshold;
	static const string logFilename;
	static const LogLevel defaultLogTreshold;

	ofstream logFile;

	string logLevelToString(LogLevel logLevel);

	Logger(void);
	Logger(const Logger &);

public:
	static Logger& getInstance();
	
	~Logger(void);

	void log(LogLevel, string);
	void setLogTreshold(LogLevel);
};

